<%@ Page Language="c#" Inherits="PHSRAG.Insight21.Agreements.AgreementsBudgetOverview"
    CodeFile="AgreementsBudgetOverview.aspx.cs" %>

<%@ Register TagPrefix="cc2" Namespace="PHSRAG.WebControls" Assembly="PHSRAG.WebControls" %>
<%@ Register TagPrefix="cc1" Namespace="PHSRAG.Insight21.InsightWebControls" Assembly="PHSRAG.Insight21.InsightWebControls" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>AgreementsBudgetOverview</title>
    <link href="../Insight21.css" type="text/css" rel="stylesheet" />
</head>
<body>
    <form id="BudgetOverviewForm" method="post" runat="server">
        <table class="Container">
            <tr>
                <td style="width:1050px">
                    <table class="Header" width="100%" style="background-color: #ffffff">
                        <tr>
                            <td>
                                <cc1:Header ID="insightHeader" runat="server" OnNavigate="OnHeaderNavigate" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <cc1:AgreementsSubNavigation ID="agreementsSubNavigation" runat="server" EnableOverviewNavigation="true"
                                    OnNavigate="OnSubNavigate" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <cc1:AgreementDetailsSubNavigation ID="agreementDetailsSubNavigation" runat="server"
                                    OnNavigate="OnDetailsSubNavigate" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <br />
                                <cc2:BreadCrumb ID="breadCrumb" runat="server" OnNavigate="OnNavigate" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <cc1:ProjectHeaderBar ID="projectHeaderBar" runat="server" />
                            </td>
                        </tr>
                    </table>
                    <asp:Panel ID="displaySection" runat="server">
                        <div id="overviewFilter" style="background-color: #ffffff" runat="server">
                            <table class="SearchContainer" cellspacing="10">
                                <tr>
                                    <td>
                                        <table class="SearchInDiv">
                                            <tr>
                                                <td>
                                                    <cc1:CommonSearch ID="commonSearch" runat="server" EmbeddedExtendedSearchControl="PHSRAG.Insight21.InsightWebControls/OverviewSearch"
                                                        EmbeddedExtendedSearchControlProperties="BudgetStartEndFilterVisible=false,BudgetEndingFilterVisible=false,IncludeUserOrdersFilterVisible=true,ExpenseDateFilterVisible=false"
                                                        HideAllCommonControls="true" Module="Agreements" OnClearSelection="OnClearSelection"
                                                        OnSearch="OnSearch" />
                                                </td>
                                            </tr>
                                        </table>
                                        <table>
                                            <tr>
                                                <td>
                                                    <cc1:SearchCriteriaDisplay ID="searchCriteriaDisplay" runat="server" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div id="detailsFilter" runat="server">
                            <table width="100%" cellspacing="0">
                                <tr>
                                    <td style="width: 5%">
                                        &nbsp;</td>
                                    <td valign="top" style="white-space: nowrap">
                                        Other Budget Years&nbsp;/&nbsp;Related Funds:&nbsp;<asp:DropDownList ID="budgetList"
                                            runat="server" CssClass="FlatDropDown" OnSelectedIndexChanged="OnBudgetChanged">
                                        </asp:DropDownList>
                                        &nbsp;&nbsp;&nbsp;&nbsp;<asp:DropDownList ID="cumLevel" runat="server" CssClass="FlatDropDown"
                                            OnSelectedIndexChanged="OnCumLevelChanged">
                                            <asp:ListItem Value="0">View Single Year</asp:ListItem>
                                            <asp:ListItem Value="1">View Cumulative Years - Fund</asp:ListItem>
                                            <asp:ListItem Value="2">View Cumulative Years - Project</asp:ListItem>
                                        </asp:DropDownList>
                                        <asp:CheckBox ID="includeUserOrders" CssClass="DataInput" Text="Include User Orders"
                                            runat="server" OnCheckedChanged="OnIncludeUserOrdersChanged" /></td>
                                    <td valign="middle" style="width: 27%">
                                        <asp:ImageButton ID="viewPREVBudgetInfo" runat="server" ImageUrl="~/Images/b_search_grey.gif">
                                        </asp:ImageButton>
                                        <asp:ImageButton ID="clearDetails" runat="server" ImageUrl="../Images/b_clearselect_grey.gif"
                                            OnClick="OnClearDetails" />
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="fundList" runat="server" CssClass="FlatDropDown" Visible="False">
                                        </asp:DropDownList><br />
                                        <br />
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <table class="Invisible" id="dynamicTable" cellspacing="10">
                            <tr>
                                <td>
                                    <cc2:ActivityIndicator ContainerID="dynamicTable" ID="activityIndicator" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <cc2:Annunciator ID="annunciator" ContainerID="dynamicTable" runat="server" />
                                </td>
                            </tr>
                        </table>
                        <table class="PlaceBar">
                            <tr>
                                <td class="PageName">
                                    <asp:Label runat="server" ID="pageName"></asp:Label></td>
                                <td align="right">
                                    <cc1:RefreshDates ID="refreshDates" runat="server" Visible="True" GLAsOfDateVisible="True"
                                        POAPAsOfDateVisible="True"></cc1:RefreshDates>
                                </td>
                                <td>
                                    <asp:Panel ID="fundCountDisplay" runat="server" CssClass="">
                                        <span style="color: white">No. of Funds:
                                            <asp:Label ID="fundCount" runat="server" CssClass="PlaceBar"></asp:Label></span></asp:Panel>
                                </td>
                                <td align="right">
                                    <cc1:InsightDownloadBar ID="reportDownload" runat="server" OnDownloadToExcel="OnDownloadToExcel"
                                        OnDownloadToPDF="OnDownloadToPDF" OnFailedAction="OnDownloadFailed" OnSendByEmail="OnSendByEmail"
                                        SQLReportName="Budget_Overview" useRootHost="True" />
                                </td>
                                <td>
                                    &nbsp;</td>
                            </tr>
                        </table>
                        <table id="budgetInfoTable" width="100%" cellspacing="0">
                            <tr>
                                <td>
                                    <cc2:ExpandingDataGrid ID="budgetInfoGrid" runat="server" AutoGenerateColumns="False"
                                        CollapseText="<img border=no src=../Images/CollapseButton.gif>" CssClass="ExpandingGrid"
                                        ExpandText="<img border=no src=../Images/ExpandButton.gif>" KeyColumnHeaderText="SortOrder"
                                        OnItemCommand="OnItemCommand" OnItemDataBound="OnItemDataBound" OnItemExpanded="OnItemExpanded"
                                        ShowFooter="True" Width="100%">
                                        <AlternatingItemStyle CssClass="ExpandingGridAltItem" />
                                        <ItemStyle CssClass="ExpandingGridItem" />
                                        <HeaderStyle CssClass="ExpandingGridHeader" />
                                        <FooterStyle CssClass="ExpandingGridFooter" />
                                        <Columns>
                                            <asp:BoundColumn DataField="CategoryID" Visible="False" ReadOnly="True" HeaderText="CategoryID">
                                            </asp:BoundColumn>
                                            <asp:boundcolumn datafield="SortOrder" visible="False" readonly="True" headertext="SortOrder">
                                            </asp:boundcolumn>
                                            <asp:BoundColumn DataField="AccountNumber" Visible="False" ReadOnly="True" HeaderText="AccountNumber">
                                            </asp:BoundColumn>
                                            <asp:templatecolumn headertext="<b>Category/Account</b>">
                                                <itemtemplate>
													<asp:label id="category" runat="server"></asp:label>
												</itemtemplate>
                                                <footertemplate>
													<table class="BudgetOverview" cellpadding="0" cellspacing="0">
														<tr><td><asp:label id="priorYearBalanceCaption" runat="server"><strong>Prior Year Balance</strong></asp:label></td></tr>
														<tr class="totalCosts"><td><asp:label id="cashBalanceCaption" runat="server"><strong>Cash Balance</strong></asp:label></td></tr>
													</table>
												</footertemplate>
                                            </asp:templatecolumn>
                                            <asp:templatecolumn headertext="<b>Budget</b>">
                                                <itemtemplate>
													<asp:label id="budget" runat="server" width="100%"></asp:label>
												</itemtemplate>
                                                <footertemplate>
													<table class="BudgetOverview" cellpadding="0" cellspacing="0">
														<tr align="right"><td>&nbsp;</td></tr>
														<tr class="totalCosts" align="right"><td><asp:label id="cashBalanceBudget" runat="server"></asp:label>&nbsp;</td></tr>
													</table>
												</footertemplate>
                                            </asp:templatecolumn>
                                            <asp:templatecolumn headertext="<b>Expense</b>">
                                                <itemtemplate>
													<asp:label id="expense" runat="server" width="100%"></asp:label>
												</itemtemplate>
                                                <footertemplate>
													<table class="BudgetOverview" cellpadding="0" cellspacing="0">
														<tr align="right"><td><asp:label id="priorYearBalance" runat="server"></asp:label></td></tr>
														<tr class="totalCosts" align="right"><td><asp:label id="cashBalanceExpense" runat="server"></asp:label></td></tr>
													</table>
												</footertemplate>
                                            </asp:templatecolumn>
                                            <asp:templatecolumn headertext="<b>Encumbrance</b>">
                                                <itemtemplate>
													<asp:label id="encumbrance" runat="server" width="100%"></asp:label>
												</itemtemplate>
                                                <footertemplate>
													<table class="BudgetOverview" cellpadding="0" cellspacing="0">
														<tr align="right"><td>&nbsp;</td></tr>
														<tr class="totalCosts" align="right"><td><asp:label id="cashBalanceEncumbrance" runat="server"></asp:label>&nbsp;</td></tr>
													</table>
												</footertemplate>
                                            </asp:templatecolumn>
                                            <asp:templatecolumn headertext="<b>Balance Available</b>">
                                                <itemtemplate>
													<asp:label id="balanceAvailable" runat="server" width="100%"></asp:label>
												</itemtemplate>
                                                <footertemplate>
													<table class="BudgetOverview" cellpadding="0" cellspacing="0">
														<tr align="right"><td>&nbsp;</td></tr>
														<tr class="totalCosts" align="right"><td><asp:label id="cashBalance" runat="server"></asp:label></td></tr>
													</table>
												</footertemplate>
                                            </asp:templatecolumn>
                                        </Columns>
                                    </cc2:ExpandingDataGrid>
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                    <asp:Panel ID="spaceBudgetSal" runat="server">
                        &nbsp &nbsp &nbsp &nbsp &nbsp
                    </asp:Panel>
                    <asp:Panel ID="SalaryDetails" runat="server">
                        <table width="100%" cellspacing="0" border="0">
                            <tr>
                                <td class="PageName" style="width: 937px">
                                    <asp:Label runat="server" ID="lbSalaryDetails" Text="Personnel For Current Budget Period"></asp:Label></td>
                            </tr>
                            <tr>
                                <td style="width: 937px">
                                    <cc2:Pager ID="pagerAboveDatagrid" runat="server" OnFirstPage="OnFirstPage" OnLastPage="OnLastPage"
                                        OnNextPage="OnNextPage" OnPreviousPage="OnPreviousPage" />
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 937px">
                                    <asp:DataGrid ID="dataGrid" runat="server" AllowCustomPaging="True" AllowPaging="True"
                                        AutoGenerateColumns="False" CssClass="DataGrid" OnItemCommand="OndataGridItemCommand"
                                        OnItemDataBound="SalaryDetailsItemDataBound" ShowFooter="True" Width="100%">
                                        <AlternatingItemStyle CssClass="DataGridAlternatingItem" />
                                        <ItemStyle CssClass="DataGridItem" />
                                        <HeaderStyle CssClass="DataGridHeader" />
                                        <FooterStyle CssClass="DataGridFooter"></FooterStyle>
                                        <PagerStyle Visible="False" />
                                        <Columns>
                                            <asp:BoundColumn DataField="LastName" SortExpression="LastName" ReadOnly="True" HeaderText="Last Name"
                                                FooterText="Totals"></asp:BoundColumn>
                                            <asp:BoundColumn DataField="FirstName" SortExpression="FirstName" ReadOnly="True"
                                                HeaderText="First Name"></asp:BoundColumn>
                                            <asp:BoundColumn DataField="FundNumber" SortExpression="FundNumber" ReadOnly="True"
                                                HeaderText="Fund #"></asp:BoundColumn>
                                            <asp:BoundColumn DataField="AnnualRate" SortExpression="AnnualRate" ReadOnly="True"
                                                HeaderText="Annual Rate" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right">
                                            </asp:BoundColumn>
                                            <asp:BoundColumn DataField="StartDate" SortExpression="StartDate" ReadOnly="True"
                                                HeaderText="Start Date"></asp:BoundColumn>
                                            <asp:BoundColumn DataField="EndDate" SortExpression="EndDate" ReadOnly="True" HeaderText="End Date">
                                            </asp:BoundColumn>
                                            <asp:BoundColumn DataField="MonthlyRate" SortExpression="MonthlyRate" ReadOnly="True"
                                                HeaderText="Monthly Rate" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right">
                                            </asp:BoundColumn>
                                            <asp:BoundColumn DataField="MonthsRemaining" SortExpression="MonthsRemaining" ReadOnly="True"
                                                HeaderText="Months Remaining" DataFormatString="{0:f}"></asp:BoundColumn>
                                            <asp:BoundColumn DataField="CommittedSalary" SortExpression="CommittedSalary" ReadOnly="True"
                                                HeaderText="Committed Salary" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right">
                                            </asp:BoundColumn>
                                            <asp:BoundColumn DataField="FringeRate" SortExpression="FringeRate" ReadOnly="True"
                                                HeaderText="Fringe Rate"></asp:BoundColumn>
                                            <asp:BoundColumn DataField="CommittedFringe" SortExpression="CommittedFringe" ReadOnly="True"
                                                HeaderText="Committed Fringe" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right">
                                            </asp:BoundColumn>
                                            <asp:BoundColumn DataField="TotalCommitted" SortExpression="TotalCommitted" ReadOnly="True"
                                                HeaderText="Total Committed" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right">
                                            </asp:BoundColumn>
                                            <asp:ButtonColumn ButtonType="LinkButton" DataTextField="PaidToDate" SortExpression="PaidToDate"
                                                CommandName="LinkLaborDistribution" HeaderText="Paid To Date" ItemStyle-HorizontalAlign="Right"
                                                FooterStyle-HorizontalAlign="Right"></asp:ButtonColumn>
                                            <asp:BoundColumn DataField="SponsorEffort" SortExpression="SponsorEffort" ReadOnly="True"
                                                HeaderText="Sponsor Effort" DataFormatString="{0:f}"></asp:BoundColumn>
                                            <asp:BoundColumn DataField="TrackedEffort" SortExpression="TrackedEffort" ReadOnly="True"
                                                HeaderText="Tracked Effort" DataFormatString="{0:f}"></asp:BoundColumn>
                                            <asp:BoundColumn DataField="PerEmployeeJobMapId" SortExpression="PerEmployeeJobMapId"
                                                ReadOnly="True" Visible="False" HeaderText="PerEmployeeJobMapId"></asp:BoundColumn>
                                        </Columns>
                                    </asp:DataGrid></td>
                            </tr>
                            <tr>
                                <td style="width: 937px">
                                    <cc2:Pager ID="pagerBelowDatagrid" runat="server" OnFirstPage="OnFirstPage" OnLastPage="OnLastPage"
                                        OnNextPage="OnNextPage" OnPreviousPage="OnPreviousPage" />
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                </td>
            </tr>
        </table>
    </form>
</body>
</html>
